<form ng-controller="ZsetValueCtrl" style="height:100%;">
	<div class="form-group">
		<div class="input-group">
			<input type="text" class="form-control" ng-model="keyName" aria-describedby="button-addon4">
			<div class="input-group-append">
				<button class="btn btn-outline-primary" type="button" ng-click="updateName()">修改名称</button>
			</div>
			<input type="text" ng-model="ttl" class="form-control">
			<div class="input-group-append">
				<button class="btn btn-outline-primary" type="button" ng-click="updateTTL()">更新过期时间</button>
			</div>
		</div>
	</div>

	<div class="form-group">
		<div class="input-group">
			<div class="input-group-prepend">
				<span class="input-group-text">过滤器</span>
			</div>
			<input type="text" ng-model="match" ng-change="matchChange()" class="form-control">
			<div class="input-group-prepend">
				<span class="input-group-text">显示条数</span>
			</div>
			<input type="text" ng-model="count" ng-change="matchChange()" class="form-control">
		</div>
	</div>

	<hr />

	<div class="form-group">
		<div class="input-group">
			<div class="input-group-prepend">
				<span class="input-group-text">评分</span>
			</div>
			<input type="number" ng-model="selectedItem.score" ng-disabled="updateDisabled" class="form-control">
			<div class="input-group-prepend">
				<span class="input-group-text">值</span>
			</div>
			<input type="text" ng-model="selectedItem.value" ng-disabled="updateDisabled" class="form-control">
			<div class="input-group-append">
				<button class="btn btn-outline-primary" type="button" ng-disabled="updateDisabled" ng-click="updateItem()">修改值</button>
			</div>
		</div>

	</div>

	<div class="form-group">
		<div class="input-group">
			<div class="input-group-prepend">
				<span class="input-group-text">评分</span>
			</div>
			<input type="number" ng-model="newItemData.score" class="form-control">
			<div class="input-group-prepend">
				<span class="input-group-text">值</span>
			</div>
			<input type="text" ng-model="newItemData.value" class="form-control">
			<div class="input-group-append">
				<button class="btn btn-outline-primary" type="button" ng-click="newItem()">新增值</button>
			</div>
		</div>
	</div>
	<hr />
	<div style="height: calc(100% - 220px);  overflow: auto;">
		<table class="table table-hover table-bordered table-sm">
			<thead>
				<tr>
					<th>评分</th>
					<th>元素</th>
					<th style="width: 75px;">操作</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="item in items" ng-click="editItem(item)">
					<td>{{item.score}}</td>
					<td>{{item.value}}</td>
					<td>
						<button type="button" class="btn btn-danger btn-sm" ng-click="deleteItem(item)">删除</button>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</form>
